<template>
<div class="swipe">
        <van-swipe :autoplay="3000" >
            <van-swipe-item v-for="(image, index) in images" :key="index">
                <img v-lazy="image.bannerUrl" />
            </van-swipe-item>
        </van-swipe>
</div>
</template>

<script>
import { banner_list } from '../../../utils/api'
export default {
    data() {
        return {
            images: [],
        };
    },
    mounted() {
        banner_list({}).then((res) => {
            this.images = res.data.list;
            // console.log(this.images);
        })
    }
}
</script>

<style lang="scss" scoped>
.swipe{
    width: 100%;
        img{
            width: 95%;
            margin: 8px 2.5%;
        }
}
</style>